<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<meta content="webkit" name="renderer" />
  	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <base href="<%=basePath%>">
    
    <title>基于WEB的人脸识别考勤系统——控制台</title>

	<!-- Bootstrap core CSS -->
    <link href="bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="css/style.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="assets/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <link rel="stylesheet" href="layui/css/layui.css" media="all">
  </head>
  
  <body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand">人脸识别考勤系统控制台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="index.action">主页</a></li>
			<li><a href="main.action">控制台</a></li>
			<li><a onclick="changeclass()">变更班级</a></li>
			<% if(session.getAttribute("loginTid") == null || session.getAttribute("loginTid") == ""){ %>
			<li id="user"><a href="loginpage.action">登录</a></li>
			<% }else{ %>
			<li id="user" onclick="logout()"><a><%=session.getAttribute("loginTname") %>-登出</a></li>
			<% } %>
          </ul>
        </div>
      </div>
    </nav>

    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar" id="mainMenu">
          <ul class="nav nav-sidebar">
            <li class="active"><a>概要</a></li>
          </ul>
          <ul class="nav nav-sidebar">
          	<!-- <li><a>班级管理</a></li> -->
            <li><a>学生管理</a></li>
			<li><a>课程管理</a></li>
			<!-- <li><a>教师管理</a></li> -->
			<li><a>时间管理</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a>考勤记录管理</a></li>
            <li><a>记录可视化</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a href="detection.action">返回检测页面</a></li>
          </ul>
        </div>
        <!-- 右侧内容部分 -->
        <iframe id="myIframe" src="main/home.action" width="100%" height="700px" frameborder="0" style="margin-top: 60px;"></iframe>
        <!-- 右侧内容部分结束 -->
      </div>
    </div>


	<form class="layui-form" id="changeclassView" lay-filter="changeclassView" action="" style="display: none; padding: 20px 20px 0px 20px;">
		<div class="layui-form-item">
			<p>请输入班级名（测试请使用“教技1511”）</p>
		</div>
		<div class="layui-form-item">
			<input type="text" id="classname" placeholder="请输入" autocomplete="off" class="layui-input">
		</div>
		<div class="layui-form-item" style="text-align: right;">
			<button class="layui-btn layui-btn-sm" type="submit">提交</button>
		</div>
	</form>
	
    <!-- Bootstrap core JavaScript =============================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script>
    <script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <!-- Just to make our placeholder images work. Don't actually copy the next line! -->
    <script src="assets/js/vendor/holder.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="assets/js/ie10-viewport-bug-workaround.js"></script>
    <script src="js/main.js"></script>
    <script src="layui/layui.js"></script>
    <script type="text/javascript">
    layui.use(['table','form','layer','laytpl'], function(){
    	
    });
    
    function changeclass(){
	  	layer.open({
			type: 1
			,title :'变更班级'
			,offset: 'auto' 
			,id: 'changeclass' //防止重复弹出
			,content: $("#changeclassView")
		});
	}
    
    function logout(){
		layer.confirm('您确定登出吗？', {
			title: '信息'
			,btn: ['是','否'] //按钮
		}, function(){
			$.ajax(
			{
				type:"get",
				url:"logout.action",
				success : function(result){
					layer.msg(result.msg);
					window.location.href = "loginpage.action";
				}
			});
		}, function(){
			
		});
	}
    </script>
  </body>
</html>
